package com.bafa.front.admin;

import com.bafa.dbcache.LeagueCache;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.bafa.exceptions.ErrorException;
import com.bafa.front.presentationbeans.FixturesListBean;
import com.bafa.front.presentationbeans.MatchBean;
import com.bafa.front.utils.FrontUtils;
import com.bafa.objects.PageBean;
import com.bafa.services.RetrieveServices;

public class DisplayRescheduleMatch extends AdminServlet {


	@Override
	public void doAdminEvent(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, ErrorException {
		
		request.setAttribute("RESCHEDULEMATCH",new MatchBean(RetrieveServices.getMatch(new Integer(request.getParameter("MatchId")).intValue())));
		request.setAttribute("FIXTURES",new FixturesListBean(RetrieveServices.getAllUnplayedMatches(),FrontUtils.getThisSeason(request).getId()));
		pageBean = (PageBean)LeagueCache.getPages().get("reschedulefixture");;
		
	}
}
